import Vue from 'vue'
export default {
	namespaced:true,
	/* 属性值 */
	state: {
		/* 底部导航列表 */
		tabBarList: [
			{
				iconPath: "home",
				selectedIconPath: "home-fill",
				text: '首页',
				count: 2,
				isDot: true,
				customIcon: false,
			},
			{
				iconPath: "chat",
				selectedIconPath: "chat-fill",
				text: '大厅',
				customIcon: false,
				url:'/pages/dialogue/index'
			},
			{
				iconPath: "https://cdn.uviewui.com/uview/common/min_button.png",
				selectedIconPath: "https://cdn.uviewui.com/uview/common/min_button_select.png",
				text: '发布',
				midButton: true,
				customIcon: false,
			},
			{
				iconPath: "list",
				selectedIconPath: "list-dot",
				text: '好友',
				customIcon: false,
				url:'/pages/contact/index'
			},
			{
				iconPath: "account",
				selectedIconPath: "account-fill",
				text: '我',
				isDot: false,
				customIcon: false,
				url:'/pages/my/index'
			},
		],
		/* 底部导航选中项 */
		tabBarCurrent:0,
		appClientid:null,
		//APP是否完成
		appReady:false,
	},
	
	/* 
		计算属性 
		定义 doneTodos:(state, getters,rootState)=>{}
		使用 store.getters.doneTodosCount
	*/
	getters: {

	},
	/* 
		计算方法
		定义 increment :function(state,data){}
		使用 store.commit('increment', data) or  store.commit({type:'increment',...data})
	 */
	mutations: {
		changeTabBarCurrent(state,data=0){
			state.tabBarCurrent=data.index||data
		},
		setClientid(state,data){
			state.appClientid=data
		},
		appStart(state,data){
			state.appReady=data
			state.startTime=Date.now()
		}
	},
	/* 
		导步计算方法
		定义 incrementAsync  :function ({ commit, state,dispatch,rootState  },data){commit('increment',data)}
		使用 store.dispatch('incrementAsync', data) or  store.commit({type:'incrementAsync',...data})
	 */
  actions: {
		
  }
}